<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>骨架屏加载效果</title>
    <style>
        :root {
            --skeleton-base: #f5f7fa;
            --skeleton-highlight: #e0e4eb;
            --skeleton-margin: 1.5rem;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f9fafb;
            color: #333;
            line-height: 1.6;
            padding: 2rem;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
        }
        
        h1 {
            text-align: center;
            margin-bottom: 3rem;
            color: #1a202c;
        }
        
        /* 卡片骨架屏样式 */
        .skeleton-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }
     
        /* 列表骨架屏样式 */
        .skeleton-list {
            background: white;
            border-radius: 0.75rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            overflow: hidden;
            margin-bottom: 3rem;
        }
        
        .skeleton-list-header {
            padding: 1.5rem;
            border-bottom: 1px solid #e2e8f0;
        }
        
        .skeleton-list-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #1a202c;
            margin-bottom: 0.5rem;
        }
        
        .skeleton-list-body {
            padding: 0;
        }
        
        .skeleton-list-item {
            padding: 1.5rem;
            border-bottom: 1px solid #edf2f7;
            display: flex;
            align-items: center;
            animation: pulse 1.5s infinite;
        }
        
        .skeleton-list-item:last-child {
            border-bottom: none;
        }
        
        .skeleton-avatar {
            width: 3.5rem;
            height: 3.5rem;
            background: var(--skeleton-base);
            border-radius: 50%;
            margin-right: 1rem;
        }
        
        .skeleton-list-content {
            flex: 1;
        }
        
        .skeleton-list-name {
            height: 1.25rem;
            background: var(--skeleton-base);
            border-radius: 0.375rem;
            margin-bottom: 0.5rem;
        }
        
        .skeleton-list-desc {
            height: 1rem;
            background: var(--skeleton-base);
            border-radius: 0.375rem;
            width: 80%;
        }
        
        /* 骨架屏动画 */
        @keyframes pulse {
            0%, 100% {
                background-color: var(--skeleton-base);
            }
            50% {
                background-color: var(--skeleton-highlight);
            }
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .skeleton-cards {
                grid-template-columns: 1fr;
            }
            
            body {
                padding: 1rem;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>骨架屏加载效果演示</h1>
     
        
        <!-- 列表式骨架屏 -->
        <div class="skeleton-list">
            <div class="skeleton-list-header">
                <div class="skeleton-list-title">用户列表</div>
            </div>
            <div class="skeleton-list-body">
                <div class="skeleton-list-item">
                    <div class="skeleton-avatar"></div>
                    <div class="skeleton-list-content">
                        <div class="skeleton-list-name"></div>
                        <div class="skeleton-list-desc"></div>
                    </div>
                </div>
                
                <div class="skeleton-list-item">
                    <div class="skeleton-avatar"></div>
                    <div class="skeleton-list-content">
                        <div class="skeleton-list-name"></div>
                        <div class="skeleton-list-desc"></div>
                    </div>
                </div>
                
                <div class="skeleton-list-item">
                    <div class="skeleton-avatar"></div>
                    <div class="skeleton-list-content">
                        <div class="skeleton-list-name"></div>
                        <div class="skeleton-list-desc"></div>
                    </div>
                </div>
                
                <div class="skeleton-list-item">
                    <div class="skeleton-avatar"></div>
                    <div class="skeleton-list-content">
                        <div class="skeleton-list-name"></div>
                        <div class="skeleton-list-desc"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>